package net.zjitc.mapper;

import net.zjitc.pojo.Order;
import net.zjitc.pojo.OrderItem;
import net.zjitc.vo.OrderConditionVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author admin
 * @Date 2019/4/9 8:13
 */
@Repository
public interface OrderMapper {
    List<Order> findAll();

    List<Order> findOrderByDate(@Param(value = "year") String year,
                                @Param(value = "month") String month);

    List<OrderItem>findItemByOrderid(@Param(value = "orders") List<Order> orders);

    Order findById(String id);
    List<Order> findByCondition(OrderConditionVo vo);

    void delete(String id);

    List<Order> findByDayInInterval(String day);

    int add(Order order);

    List<Order> findOrderByUser(int id);

    void update_state(String id);
}
